package com.framework.service.impl;

import cn.dev33.satoken.util.SaResult;
import com.framework.entity.Role;
import com.framework.repository.RoleRepository;
import com.framework.service.RoleService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Description: 角色服务接口服务接口实现
 * @Author: JamesYao
 * @DateTime: 2024/2/19 17:20
 */

@Service
@RequiredArgsConstructor
@Transactional
public class RoleServiceImpl implements RoleService {

    private final RoleRepository roleRepository;

    @Override
    public SaResult saveRole(Role role) {
        roleRepository.save(role);
        return SaResult.ok();
    }
}
